//
//  LabelTextView.m
//  DSYDouban
//
//  Created by dllo on 16/1/1.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "LabelTextView.h"

@interface LabelTextView ()

@property (nonatomic, retain) UIView *contentsView;

@end

@implementation LabelTextView

- (void)dealloc
{
    [_LTLabel release];
    [_LTTextField release];
    
    [_contentsView release];
    [super dealloc];
}

- (instancetype) initWithFrame:(CGRect)frame
{
//    NSLog(@"创建开始");
    self = [super initWithFrame:frame];
    if (self) {
        [self create];
    }
    return self;
}

- (void)create {
    
    self.LTLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width / 3, self.frame.size.height)];
//    _LTLabel.backgroundColor = [UIColor blueColor];
    _LTLabel.textAlignment = NSTextAlignmentRight;
    [self addSubview:_LTLabel];
    [_LTLabel release];
    
    self.LTTextField = [[UITextField alloc] initWithFrame:CGRectMake(self.frame.size.width / 3, 0, self.frame.size.width * 2 / 3, self.frame.size.height)];
    
    _LTTextField.layer.borderWidth = 1.0;
    _LTTextField.layer.cornerRadius = 10.0;
    _LTTextField.clearButtonMode = YES;
//    _LTTextField.clearsOnBeginEditing = YES;
    
    [self addSubview:_LTTextField];
    [_LTTextField release];

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
